/*
 *  Copyright 2010 INFN - APE group
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#pragma once

#include <cuos/version.h>

#if defined(_DEBUG)
#define CUOS_DEBUG 1
#endif

#ifndef CUOS_ENABLE_TRACING
// enable cuos_trace() and cuosTrace() calls
#define CUOS_ENABLE_TRACING 0
#endif

// extra debugging checks
#ifndef CUOS_ENABLE_EXTRA_CHECKS
#define CUOS_ENABLE_EXTRA_CHECKS 0
#warning "CUOS: performance degradation due to extra checks"
#endif

#ifndef CUOS_REPLY_DUMMY_WORDS
#define CUOS_REPLY_DUMMY_WORDS 0
#endif

// use pinned-memory (cudaHostAlloc) for temporary buffers
// there is a race condition as cudaFreeHost can serialize streams thereby
// blocking system service handling
#define CUOS_USE_PINNED_POOL 1
#define CUOS_USE_PINNED_BUF 0
//#define CUOS_PINNED_BUF_THRESHOLD 0x100000 // 1MB

/*
 * Local variables:
 *  c-indent-level: 4
 *  c-basic-offset: 4
 *  tab-width: 4
 *  indent-tabs-mode: nil
 * End:
 */
